package doubleLinkedNode;

public abstract class DoubleLinkedNode {

    private int id;
    private String name;
    private DoubleLinkedNodeImpl preNode;
    private DoubleLinkedNodeImpl nextNode;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public DoubleLinkedNode(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public DoubleLinkedNodeImpl getPreNode() {
        return preNode;
    }

    public void setPreNode(DoubleLinkedNodeImpl perNode) {
        this.preNode = perNode;
    }

    public DoubleLinkedNodeImpl getNextNode() {
        return nextNode;
    }

    public void setNextNode(DoubleLinkedNodeImpl nextNode) {
        this.nextNode = nextNode;
    }

    public abstract void printAll();

    public abstract void addNode(DoubleLinkedNodeImpl newNode);

    public abstract void addInOrder(DoubleLinkedNodeImpl newNode);

    public abstract int getLength();
}
